//
//  FileRowLabel.swift
//  ExcalidrawZ
//
//  Created by Dove Zachary on 3/5/25.
//

import SwiftUI
import SFSafeSymbols

struct FileRowLabel: View {
    @Environment(\.diclosureGroupDepth) private var depth

    var name: String
    var updatedAt: Date
    var isInTrash: Bool
    
    var nameTrailingView: AnyView
    
    init<T: View>(
        name: String,
        updatedAt: Date,
        isInTrash: Bool = false,
        @ViewBuilder nameTrailingView: () -> T = {
            EmptyView()
        }
    ) {
        self.name = name
        self.updatedAt = updatedAt
        self.isInTrash = isInTrash
        self.nameTrailingView = AnyView(nameTrailingView())
    }
    
    var body: some View {
        HStack(spacing: 10) {
            ExcalidrawIconView()
                .frame(height: 14)
                .opacity(isInTrash ? 0.3 : 1.0)
            
            Text(name)
            
            Spacer(minLength: 0)
        }
        .lineLimit(1)
        .truncationMode(.middle)
        .padding(.leading, 2 + CGFloat(depth+1) * 12)
    }
}



struct ExcalidrawRawIcon: Shape {
    func path(in rect: CGRect) -> Path {
        var path = Path()
        let width = rect.size.width
        let height = rect.size.height
        path.move(to: CGPoint(x: 0.99842*width, y: 0.88317*height))
        path.addCurve(to: CGPoint(x: 0.994*width, y: 0.88217*height), control1: CGPoint(x: 0.99723*width, y: 0.88208*height), control2: CGPoint(x: 0.99554*width, y: 0.8817*height))
        path.addCurve(to: CGPoint(x: 0.87167*width, y: 0.73442*height), control1: CGPoint(x: 0.95908*width, y: 0.83058*height), control2: CGPoint(x: 0.91467*width, y: 0.78167*height))
        path.addLine(to: CGPoint(x: 0.86458*width, y: 0.72667*height))
        path.addCurve(to: CGPoint(x: 0.86358*width, y: 0.72417*height), control1: CGPoint(x: 0.86458*width, y: 0.72575*height), control2: CGPoint(x: 0.86417*width, y: 0.72492*height))
        path.addCurve(to: CGPoint(x: 0.86075*width, y: 0.7225*height), control1: CGPoint(x: 0.86288*width, y: 0.72328*height), control2: CGPoint(x: 0.86187*width, y: 0.72268*height))
        path.addLine(to: CGPoint(x: 0.85933*width, y: 0.721*height))
        path.addLine(to: CGPoint(x: 0.85833*width, y: 0.72025*height))
        path.addCurve(to: CGPoint(x: 0.85042*width, y: 0.71733*height), control1: CGPoint(x: 0.85708*width, y: 0.71758*height), control2: CGPoint(x: 0.85392*width, y: 0.71558*height))
        path.addCurve(to: CGPoint(x: 0.81375*width, y: 0.74267*height), control1: CGPoint(x: 0.83725*width, y: 0.72408*height), control2: CGPoint(x: 0.82542*width, y: 0.73375*height))
        path.addCurve(to: CGPoint(x: 0.76858*width, y: 0.78033*height), control1: CGPoint(x: 0.79817*width, y: 0.75458*height), control2: CGPoint(x: 0.78292*width, y: 0.767*height))
        path.addCurve(to: CGPoint(x: 0.75217*width, y: 0.79775*height), control1: CGPoint(x: 0.76275*width, y: 0.78575*height), control2: CGPoint(x: 0.757*width, y: 0.79142*height))
        path.addCurve(to: CGPoint(x: 0.75442*width, y: 0.805*height), control1: CGPoint(x: 0.74983*width, y: 0.80083*height), control2: CGPoint(x: 0.75158*width, y: 0.80375*height))
        path.addCurve(to: CGPoint(x: 0.72375*width, y: 0.83617*height), control1: CGPoint(x: 0.74425*width, y: 0.815*height), control2: CGPoint(x: 0.734*width, y: 0.82542*height))
        path.addCurve(to: CGPoint(x: 0.72242*width, y: 0.83983*height), control1: CGPoint(x: 0.72283*width, y: 0.83717*height), control2: CGPoint(x: 0.72233*width, y: 0.8385*height))
        path.addCurve(to: CGPoint(x: 0.72425*width, y: 0.84325*height), control1: CGPoint(x: 0.7225*width, y: 0.84117*height), control2: CGPoint(x: 0.72317*width, y: 0.84242*height))
        path.addLine(to: CGPoint(x: 0.74225*width, y: 0.857*height))
        path.addCurve(to: CGPoint(x: 0.7425*width, y: 0.85733*height), control1: CGPoint(x: 0.74225*width, y: 0.857*height), control2: CGPoint(x: 0.74233*width, y: 0.85725*height))
        path.addCurve(to: CGPoint(x: 0.86125*width, y: 0.95533*height), control1: CGPoint(x: 0.76825*width, y: 0.88275*height), control2: CGPoint(x: 0.81342*width, y: 0.918*height))
        path.addCurve(to: CGPoint(x: 0.88267*width, y: 0.97208*height), control1: CGPoint(x: 0.86833*width, y: 0.96092*height), control2: CGPoint(x: 0.8755*width, y: 0.9665*height))
        path.addCurve(to: CGPoint(x: 0.892*width, y: 0.98375*height), control1: CGPoint(x: 0.88592*width, y: 0.976*height), control2: CGPoint(x: 0.889*width, y: 0.97992*height))
        path.addCurve(to: CGPoint(x: 0.89867*width, y: 0.98467*height), control1: CGPoint(x: 0.89358*width, y: 0.98583*height), control2: CGPoint(x: 0.89658*width, y: 0.98625*height))
        path.addCurve(to: CGPoint(x: 0.90192*width, y: 0.98725*height), control1: CGPoint(x: 0.89975*width, y: 0.9855*height), control2: CGPoint(x: 0.90083*width, y: 0.98642*height))
        path.addCurve(to: CGPoint(x: 0.90483*width, y: 0.98825*height), control1: CGPoint(x: 0.90275*width, y: 0.9879*height), control2: CGPoint(x: 0.90377*width, y: 0.98825*height))
        path.addCurve(to: CGPoint(x: 0.90858*width, y: 0.98642*height), control1: CGPoint(x: 0.9063*width, y: 0.98825*height), control2: CGPoint(x: 0.90768*width, y: 0.98757*height))
        path.addCurve(to: CGPoint(x: 0.9095*width, y: 0.98383*height), control1: CGPoint(x: 0.90917*width, y: 0.98567*height), control2: CGPoint(x: 0.90942*width, y: 0.98475*height))
        path.addCurve(to: CGPoint(x: 0.91033*width, y: 0.98408*height), control1: CGPoint(x: 0.90983*width, y: 0.98383*height), control2: CGPoint(x: 0.91008*width, y: 0.98408*height))
        path.addCurve(to: CGPoint(x: 0.91383*width, y: 0.98258*height), control1: CGPoint(x: 0.91158*width, y: 0.98408*height), control2: CGPoint(x: 0.91292*width, y: 0.98358*height))
        path.addLine(to: CGPoint(x: 0.99867*width, y: 0.88992*height))
        path.addCurve(to: CGPoint(x: 0.99991*width, y: 0.88675*height), control1: CGPoint(x: 0.99947*width, y: 0.88906*height), control2: CGPoint(x: 0.99991*width, y: 0.88792*height))
        path.addCurve(to: CGPoint(x: 0.99833*width, y: 0.88325*height), control1: CGPoint(x: 0.99991*width, y: 0.88541*height), control2: CGPoint(x: 0.99933*width, y: 0.88413*height))
        path.addLine(to: CGPoint(x: 0.99842*width, y: 0.88317*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.75483*width, y: 0.85108*height))
        path.addCurve(to: CGPoint(x: 0.75658*width, y: 0.85317*height), control1: CGPoint(x: 0.75542*width, y: 0.85183*height), control2: CGPoint(x: 0.756*width, y: 0.8525*height))
        path.addCurve(to: CGPoint(x: 0.78708*width, y: 0.87917*height), control1: CGPoint(x: 0.76625*width, y: 0.86133*height), control2: CGPoint(x: 0.77658*width, y: 0.87017*height))
        path.addLine(to: CGPoint(x: 0.74442*width, y: 0.84658*height))
        path.addCurve(to: CGPoint(x: 0.74008*width, y: 0.84358*height), control1: CGPoint(x: 0.74442*width, y: 0.84658*height), control2: CGPoint(x: 0.74175*width, y: 0.84475*height))
        path.addCurve(to: CGPoint(x: 0.7375*width, y: 0.84158*height), control1: CGPoint(x: 0.73917*width, y: 0.84292*height), control2: CGPoint(x: 0.73833*width, y: 0.84225*height))
        path.addLine(to: CGPoint(x: 0.73433*width, y: 0.83892*height))
        path.addCurve(to: CGPoint(x: 0.73517*width, y: 0.838*height), control1: CGPoint(x: 0.73433*width, y: 0.83892*height), control2: CGPoint(x: 0.73492*width, y: 0.83833*height))
        path.addLine(to: CGPoint(x: 0.73808*width, y: 0.83508*height))
        path.addCurve(to: CGPoint(x: 0.78967*width, y: 0.78458*height), control1: CGPoint(x: 0.75242*width, y: 0.82058*height), control2: CGPoint(x: 0.777*width, y: 0.79642*height))
        path.addCurve(to: CGPoint(x: 0.75492*width, y: 0.85108*height), control1: CGPoint(x: 0.77625*width, y: 0.79808*height), control2: CGPoint(x: 0.74908*width, y: 0.83767*height))
        path.addLine(to: CGPoint(x: 0.75483*width, y: 0.85108*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.90092*width, y: 0.96617*height))
        path.addLine(to: CGPoint(x: 0.86575*width, y: 0.93933*height))
        path.addCurve(to: CGPoint(x: 0.82208*width, y: 0.89742*height), control1: CGPoint(x: 0.852*width, y: 0.92508*height), control2: CGPoint(x: 0.83717*width, y: 0.911*height))
        path.addCurve(to: CGPoint(x: 0.85975*width, y: 0.92667*height), control1: CGPoint(x: 0.84108*width, y: 0.91208*height), control2: CGPoint(x: 0.85733*width, y: 0.9245*height))
        path.addCurve(to: CGPoint(x: 0.89*width, y: 0.95092*height), control1: CGPoint(x: 0.87817*width, y: 0.94308*height), control2: CGPoint(x: 0.87733*width, y: 0.94008*height))
        path.addLine(to: CGPoint(x: 0.90525*width, y: 0.962*height))
        path.addCurve(to: CGPoint(x: 0.90083*width, y: 0.96608*height), control1: CGPoint(x: 0.90375*width, y: 0.96333*height), control2: CGPoint(x: 0.90225*width, y: 0.96475*height))
        path.addLine(to: CGPoint(x: 0.90092*width, y: 0.96617*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.90975*width, y: 0.97292*height))
        path.addLine(to: CGPoint(x: 0.90908*width, y: 0.97242*height))
        path.addCurve(to: CGPoint(x: 0.91317*width, y: 0.96925*height), control1: CGPoint(x: 0.91042*width, y: 0.97133*height), control2: CGPoint(x: 0.91183*width, y: 0.97033*height))
        path.addLine(to: CGPoint(x: 0.90983*width, y: 0.97292*height))
        path.addLine(to: CGPoint(x: 0.90975*width, y: 0.97292*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.352*width, y: 0.42875*height))
        path.addCurve(to: CGPoint(x: 0.35533*width, y: 0.44633*height), control1: CGPoint(x: 0.35317*width, y: 0.43475*height), control2: CGPoint(x: 0.35425*width, y: 0.44067*height))
        path.addCurve(to: CGPoint(x: 0.37658*width, y: 0.526*height), control1: CGPoint(x: 0.36108*width, y: 0.47717*height), control2: CGPoint(x: 0.36642*width, y: 0.50492*height))
        path.addLine(to: CGPoint(x: 0.38058*width, y: 0.542*height))
        path.addCurve(to: CGPoint(x: 0.3865*width, y: 0.55725*height), control1: CGPoint(x: 0.38217*width, y: 0.54808*height), control2: CGPoint(x: 0.38442*width, y: 0.55567*height))
        path.addCurve(to: CGPoint(x: 0.48558*width, y: 0.63908*height), control1: CGPoint(x: 0.41025*width, y: 0.57825*height), control2: CGPoint(x: 0.44667*width, y: 0.60958*height))
        path.addCurve(to: CGPoint(x: 0.49142*width, y: 0.639*height), control1: CGPoint(x: 0.48733*width, y: 0.64042*height), control2: CGPoint(x: 0.48975*width, y: 0.64033*height))
        path.addCurve(to: CGPoint(x: 0.49175*width, y: 0.63933*height), control1: CGPoint(x: 0.4915*width, y: 0.63917*height), control2: CGPoint(x: 0.49167*width, y: 0.63925*height))
        path.addCurve(to: CGPoint(x: 0.49492*width, y: 0.64058*height), control1: CGPoint(x: 0.49267*width, y: 0.64017*height), control2: CGPoint(x: 0.49375*width, y: 0.64058*height))
        path.addCurve(to: CGPoint(x: 0.49842*width, y: 0.639*height), control1: CGPoint(x: 0.49625*width, y: 0.64058*height), control2: CGPoint(x: 0.4975*width, y: 0.64008*height))
        path.addCurve(to: CGPoint(x: 0.61175*width, y: 0.49983*height), control1: CGPoint(x: 0.54825*width, y: 0.58358*height), control2: CGPoint(x: 0.58533*width, y: 0.538*height))
        path.addCurve(to: CGPoint(x: 0.61417*width, y: 0.49283*height), control1: CGPoint(x: 0.61342*width, y: 0.49775*height), control2: CGPoint(x: 0.61425*width, y: 0.49533*height))
        path.addCurve(to: CGPoint(x: 0.61917*width, y: 0.48717*height), control1: CGPoint(x: 0.61583*width, y: 0.49083*height), control2: CGPoint(x: 0.61758*width, y: 0.48883*height))
        path.addCurve(to: CGPoint(x: 0.62048*width, y: 0.48392*height), control1: CGPoint(x: 0.62001*width, y: 0.4863*height), control2: CGPoint(x: 0.62048*width, y: 0.48513*height))
        path.addCurve(to: CGPoint(x: 0.61833*width, y: 0.48*height), control1: CGPoint(x: 0.62048*width, y: 0.48233*height), control2: CGPoint(x: 0.61968*width, y: 0.48085*height))
        path.addCurve(to: CGPoint(x: 0.61692*width, y: 0.477*height), control1: CGPoint(x: 0.61823*width, y: 0.47887*height), control2: CGPoint(x: 0.61772*width, y: 0.4778*height))
        path.addCurve(to: CGPoint(x: 0.58808*width, y: 0.44967*height), control1: CGPoint(x: 0.60533*width, y: 0.46583*height), control2: CGPoint(x: 0.59675*width, y: 0.45775*height))
        path.addCurve(to: CGPoint(x: 0.52333*width, y: 0.38708*height), control1: CGPoint(x: 0.57275*width, y: 0.43533*height), control2: CGPoint(x: 0.55692*width, y: 0.4205*height))
        path.addCurve(to: CGPoint(x: 0.52275*width, y: 0.38658*height), control1: CGPoint(x: 0.52317*width, y: 0.38692*height), control2: CGPoint(x: 0.52292*width, y: 0.38675*height))
        path.addCurve(to: CGPoint(x: 0.52092*width, y: 0.38542*height), control1: CGPoint(x: 0.52224*width, y: 0.38606*height), control2: CGPoint(x: 0.52161*width, y: 0.38566*height))
        path.addCurve(to: CGPoint(x: 0.46875*width, y: 0.37475*height), control1: CGPoint(x: 0.51167*width, y: 0.38217*height), control2: CGPoint(x: 0.49267*width, y: 0.37892*height))
        path.addCurve(to: CGPoint(x: 0.34208*width, y: 0.3475*height), control1: CGPoint(x: 0.43358*width, y: 0.36875*height), control2: CGPoint(x: 0.38542*width, y: 0.36042*height))
        path.addLine(to: CGPoint(x: 0.34175*width, y: 0.3475*height))
        path.addLine(to: CGPoint(x: 0.34175*width, y: 0.34742*height))
        path.addCurve(to: CGPoint(x: 0.3415*width, y: 0.34758*height), control1: CGPoint(x: 0.34175*width, y: 0.34742*height), control2: CGPoint(x: 0.34158*width, y: 0.34742*height))
        path.addLine(to: CGPoint(x: 0.34142*width, y: 0.34758*height))
        path.addLine(to: CGPoint(x: 0.34175*width, y: 0.34742*height))
        path.addCurve(to: CGPoint(x: 0.33867*width, y: 0.34775*height), control1: CGPoint(x: 0.34175*width, y: 0.34742*height), control2: CGPoint(x: 0.33917*width, y: 0.3475*height))
        path.addCurve(to: CGPoint(x: 0.33708*width, y: 0.349*height), control1: CGPoint(x: 0.338*width, y: 0.34808*height), control2: CGPoint(x: 0.3375*width, y: 0.3485*height))
        path.addCurve(to: CGPoint(x: 0.33317*width, y: 0.35067*height), control1: CGPoint(x: 0.33667*width, y: 0.3495*height), control2: CGPoint(x: 0.33633*width, y: 0.35*height))
        path.addCurve(to: CGPoint(x: 0.33408*width, y: 0.35067*height), control1: CGPoint(x: 0.33*width, y: 0.35133*height), control2: CGPoint(x: 0.33383*width, y: 0.35067*height))
        path.addLine(to: CGPoint(x: 0.33317*width, y: 0.35067*height))
        path.addLine(to: CGPoint(x: 0.33317*width, y: 0.35092*height))
        path.addCurve(to: CGPoint(x: 0.3345*width, y: 0.359*height), control1: CGPoint(x: 0.33375*width, y: 0.35375*height), control2: CGPoint(x: 0.33358*width, y: 0.35575*height))
        path.addCurve(to: CGPoint(x: 0.3365*width, y: 0.36825*height), control1: CGPoint(x: 0.33433*width, y: 0.35983*height), control2: CGPoint(x: 0.33625*width, y: 0.3675*height))
        path.addLine(to: CGPoint(x: 0.35175*width, y: 0.42875*height))
        path.addLine(to: CGPoint(x: 0.352*width, y: 0.42875*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.60992*width, y: 0.48325*height))
        path.addCurve(to: CGPoint(x: 0.60958*width, y: 0.48367*height), control1: CGPoint(x: 0.60992*width, y: 0.48325*height), control2: CGPoint(x: 0.60967*width, y: 0.48358*height))
        path.addLine(to: CGPoint(x: 0.60425*width, y: 0.47775*height))
        path.addCurve(to: CGPoint(x: 0.60992*width, y: 0.48325*height), control1: CGPoint(x: 0.60608*width, y: 0.4795*height), control2: CGPoint(x: 0.60792*width, y: 0.48125*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.55083*width, y: 0.5615*height))
        path.addCurve(to: CGPoint(x: 0.55*width, y: 0.5625*height), control1: CGPoint(x: 0.55083*width, y: 0.5615*height), control2: CGPoint(x: 0.55025*width, y: 0.56217*height))
        path.addLine(to: CGPoint(x: 0.54983*width, y: 0.56233*height))
        path.addCurve(to: CGPoint(x: 0.55092*width, y: 0.5615*height), control1: CGPoint(x: 0.55017*width, y: 0.56208*height), control2: CGPoint(x: 0.5505*width, y: 0.56175*height))
        path.addLine(to: CGPoint(x: 0.55083*width, y: 0.5615*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.51708*width, y: 0.394*height))
        path.addCurve(to: CGPoint(x: 0.53425*width, y: 0.41042*height), control1: CGPoint(x: 0.52*width, y: 0.39692*height), control2: CGPoint(x: 0.53158*width, y: 0.40775*height))
        path.addCurve(to: CGPoint(x: 0.47808*width, y: 0.38642*height), control1: CGPoint(x: 0.52217*width, y: 0.40492*height), control2: CGPoint(x: 0.49208*width, y: 0.39092*height))
        path.addCurve(to: CGPoint(x: 0.51708*width, y: 0.394*height), control1: CGPoint(x: 0.49183*width, y: 0.38883*height), control2: CGPoint(x: 0.51083*width, y: 0.39192*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.35725*width, y: 0.37092*height))
        path.addCurve(to: CGPoint(x: 0.37525*width, y: 0.46592*height), control1: CGPoint(x: 0.36425*width, y: 0.38292*height), control2: CGPoint(x: 0.36975*width, y: 0.425*height))
        path.addCurve(to: CGPoint(x: 0.367*width, y: 0.42758*height), control1: CGPoint(x: 0.37217*width, y: 0.45275*height), control2: CGPoint(x: 0.3695*width, y: 0.43992*height))
        path.addCurve(to: CGPoint(x: 0.35308*width, y: 0.37025*height), control1: CGPoint(x: 0.36267*width, y: 0.40625*height), control2: CGPoint(x: 0.35867*width, y: 0.38717*height))
        path.addCurve(to: CGPoint(x: 0.35717*width, y: 0.37067*height), control1: CGPoint(x: 0.35425*width, y: 0.37033*height), control2: CGPoint(x: 0.35567*width, y: 0.3705*height))
        path.addCurve(to: CGPoint(x: 0.35733*width, y: 0.37092*height), control1: CGPoint(x: 0.35717*width, y: 0.37075*height), control2: CGPoint(x: 0.35717*width, y: 0.37083*height))
        path.addLine(to: CGPoint(x: 0.35725*width, y: 0.37092*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.35483*width, y: 0.36083*height))
        path.addCurve(to: CGPoint(x: 0.34967*width, y: 0.36042*height), control1: CGPoint(x: 0.35292*width, y: 0.36067*height), control2: CGPoint(x: 0.35117*width, y: 0.3605*height))
        path.addCurve(to: CGPoint(x: 0.34933*width, y: 0.35942*height), control1: CGPoint(x: 0.3495*width, y: 0.36008*height), control2: CGPoint(x: 0.34942*width, y: 0.35975*height))
        path.addLine(to: CGPoint(x: 0.35483*width, y: 0.36092*height))
        path.addLine(to: CGPoint(x: 0.35483*width, y: 0.36083*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.33633*width, y: 0.36458*height))
        path.addLine(to: CGPoint(x: 0.33633*width, y: 0.36442*height))
        path.addLine(to: CGPoint(x: 0.33633*width, y: 0.36458*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.99083*width, y: 0.35475*height))
        path.addCurve(to: CGPoint(x: 0.98467*width, y: 0.34425*height), control1: CGPoint(x: 0.99117*width, y: 0.35283*height), control2: CGPoint(x: 0.98167*width, y: 0.34442*height))
        path.addCurve(to: CGPoint(x: 0.98467*width, y: 0.33333*height), control1: CGPoint(x: 0.99175*width, y: 0.34392*height), control2: CGPoint(x: 0.99183*width, y: 0.333*height))
        path.addCurve(to: CGPoint(x: 0.95658*width, y: 0.33775*height), control1: CGPoint(x: 0.97525*width, y: 0.33383*height), control2: CGPoint(x: 0.96575*width, y: 0.336*height))
        path.addCurve(to: CGPoint(x: 0.90725*width, y: 0.34783*height), control1: CGPoint(x: 0.94008*width, y: 0.34083*height), control2: CGPoint(x: 0.92367*width, y: 0.34425*height))
        path.addCurve(to: CGPoint(x: 0.79808*width, y: 0.37375*height), control1: CGPoint(x: 0.87067*width, y: 0.35567*height), control2: CGPoint(x: 0.83417*width, y: 0.36392*height))
        path.addCurve(to: CGPoint(x: 0.76383*width, y: 0.38508*height), control1: CGPoint(x: 0.78675*width, y: 0.37683*height), control2: CGPoint(x: 0.77425*width, y: 0.37958*height))
        path.addCurve(to: CGPoint(x: 0.76242*width, y: 0.393*height), control1: CGPoint(x: 0.76033*width, y: 0.38692*height), control2: CGPoint(x: 0.7605*width, y: 0.39067*height))
        path.addCurve(to: CGPoint(x: 0.76008*width, y: 0.39375*height), control1: CGPoint(x: 0.76167*width, y: 0.39342*height), control2: CGPoint(x: 0.76092*width, y: 0.39367*height))
        path.addCurve(to: CGPoint(x: 0.75083*width, y: 0.39533*height), control1: CGPoint(x: 0.757*width, y: 0.39433*height), control2: CGPoint(x: 0.75392*width, y: 0.39483*height))
        path.addCurve(to: CGPoint(x: 0.74686*width, y: 0.39999*height), control1: CGPoint(x: 0.74856*width, y: 0.3957*height), control2: CGPoint(x: 0.74686*width, y: 0.39768*height))
        path.addCurve(to: CGPoint(x: 0.74758*width, y: 0.4025*height), control1: CGPoint(x: 0.74686*width, y: 0.40087*height), control2: CGPoint(x: 0.74711*width, y: 0.40175*height))
        path.addCurve(to: CGPoint(x: 0.68242*width, y: 0.48542*height), control1: CGPoint(x: 0.72825*width, y: 0.42833*height), control2: CGPoint(x: 0.70625*width, y: 0.45617*height))
        path.addCurve(to: CGPoint(x: 0.60975*width, y: 0.56992*height), control1: CGPoint(x: 0.659*width, y: 0.51217*height), control2: CGPoint(x: 0.63467*width, y: 0.54067*height))
        path.addCurve(to: CGPoint(x: 0.34392*width, y: 0.85858*height), control1: CGPoint(x: 0.53133*width, y: 0.66208*height), control2: CGPoint(x: 0.44242*width, y: 0.76658*height))
        path.addCurve(to: CGPoint(x: 0.34367*width, y: 0.86525*height), control1: CGPoint(x: 0.342*width, y: 0.86033*height), control2: CGPoint(x: 0.34192*width, y: 0.86333*height))
        path.addCurve(to: CGPoint(x: 0.34525*width, y: 0.86633*height), control1: CGPoint(x: 0.34408*width, y: 0.86575*height), control2: CGPoint(x: 0.34467*width, y: 0.86608*height))
        path.addCurve(to: CGPoint(x: 0.34125*width, y: 0.87*height), control1: CGPoint(x: 0.34392*width, y: 0.86758*height), control2: CGPoint(x: 0.34258*width, y: 0.86883*height))
        path.addCurve(to: CGPoint(x: 0.33992*width, y: 0.87267*height), control1: CGPoint(x: 0.34042*width, y: 0.87075*height), control2: CGPoint(x: 0.34008*width, y: 0.87167*height))
        path.addCurve(to: CGPoint(x: 0.338*width, y: 0.87475*height), control1: CGPoint(x: 0.33925*width, y: 0.87333*height), control2: CGPoint(x: 0.33858*width, y: 0.87408*height))
        path.addCurve(to: CGPoint(x: 0.33825*width, y: 0.88142*height), control1: CGPoint(x: 0.33625*width, y: 0.87667*height), control2: CGPoint(x: 0.33633*width, y: 0.87967*height))
        path.addCurve(to: CGPoint(x: 0.34492*width, y: 0.88117*height), control1: CGPoint(x: 0.34017*width, y: 0.88317*height), control2: CGPoint(x: 0.34317*width, y: 0.88308*height))
        path.addCurve(to: CGPoint(x: 0.34592*width, y: 0.88008*height), control1: CGPoint(x: 0.34525*width, y: 0.88083*height), control2: CGPoint(x: 0.34558*width, y: 0.88042*height))
        path.addCurve(to: CGPoint(x: 0.351*width, y: 0.87789*height), control1: CGPoint(x: 0.34724*width, y: 0.87868*height), control2: CGPoint(x: 0.34908*width, y: 0.87789*height))
        path.addCurve(to: CGPoint(x: 0.35608*width, y: 0.88008*height), control1: CGPoint(x: 0.35292*width, y: 0.87789*height), control2: CGPoint(x: 0.35476*width, y: 0.87868*height))
        path.addCurve(to: CGPoint(x: 0.37233*width, y: 0.8975*height), control1: CGPoint(x: 0.36183*width, y: 0.88625*height), control2: CGPoint(x: 0.36725*width, y: 0.89208*height))
        path.addLine(to: CGPoint(x: 0.36083*width, y: 0.88792*height))
        path.addCurve(to: CGPoint(x: 0.35417*width, y: 0.8885*height), control1: CGPoint(x: 0.35884*width, y: 0.88626*height), control2: CGPoint(x: 0.35584*width, y: 0.88652*height))
        path.addCurve(to: CGPoint(x: 0.35475*width, y: 0.89517*height), control1: CGPoint(x: 0.3525*width, y: 0.8905*height), control2: CGPoint(x: 0.35275*width, y: 0.8935*height))
        path.addLine(to: CGPoint(x: 0.47825*width, y: 0.99875*height))
        path.addCurve(to: CGPoint(x: 0.48133*width, y: 0.99983*height), control1: CGPoint(x: 0.47917*width, y: 0.9995*height), control2: CGPoint(x: 0.48025*width, y: 0.99983*height))
        path.addCurve(to: CGPoint(x: 0.48467*width, y: 0.99842*height), control1: CGPoint(x: 0.48258*width, y: 0.99983*height), control2: CGPoint(x: 0.48375*width, y: 0.99933*height))
        path.addLine(to: CGPoint(x: 0.48767*width, y: 0.99542*height))
        path.addCurve(to: CGPoint(x: 0.49292*width, y: 0.99442*height), control1: CGPoint(x: 0.48945*width, y: 0.99622*height), control2: CGPoint(x: 0.49155*width, y: 0.99582*height))
        path.addCurve(to: CGPoint(x: 0.94958*width, y: 0.58558*height), control1: CGPoint(x: 0.66033*width, y: 0.82625*height), control2: CGPoint(x: 0.79517*width, y: 0.69917*height))
        path.addCurve(to: CGPoint(x: 0.9515*width, y: 0.58133*height), control1: CGPoint(x: 0.951*width, y: 0.58458*height), control2: CGPoint(x: 0.95167*width, y: 0.58292*height))
        path.addCurve(to: CGPoint(x: 0.9555*width, y: 0.57808*height), control1: CGPoint(x: 0.95335*width, y: 0.58113*height), control2: CGPoint(x: 0.95492*width, y: 0.57986*height))
        path.addCurve(to: CGPoint(x: 0.99117*width, y: 0.37583*height), control1: CGPoint(x: 0.984*width, y: 0.49092*height), control2: CGPoint(x: 0.9895*width, y: 0.41375*height))
        path.addCurve(to: CGPoint(x: 0.99133*width, y: 0.37525*height), control1: CGPoint(x: 0.99117*width, y: 0.37558*height), control2: CGPoint(x: 0.99125*width, y: 0.37542*height))
        path.addCurve(to: CGPoint(x: 0.99167*width, y: 0.37408*height), control1: CGPoint(x: 0.9915*width, y: 0.37483*height), control2: CGPoint(x: 0.99158*width, y: 0.37442*height))
        path.addCurve(to: CGPoint(x: 0.99208*width, y: 0.3725*height), control1: CGPoint(x: 0.99192*width, y: 0.37317*height), control2: CGPoint(x: 0.99208*width, y: 0.3725*height))
        path.addCurve(to: CGPoint(x: 0.99083*width, y: 0.35458*height), control1: CGPoint(x: 0.99425*width, y: 0.366*height), control2: CGPoint(x: 0.9935*width, y: 0.35975*height))
        path.addLine(to: CGPoint(x: 0.99083*width, y: 0.35475*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.6915*width, y: 0.49117*height))
        path.addCurve(to: CGPoint(x: 0.71375*width, y: 0.466*height), control1: CGPoint(x: 0.699*width, y: 0.48258*height), control2: CGPoint(x: 0.70642*width, y: 0.47417*height))
        path.addCurve(to: CGPoint(x: 0.47367*width, y: 0.74217*height), control1: CGPoint(x: 0.66575*width, y: 0.52917*height), control2: CGPoint(x: 0.58625*width, y: 0.6265*height))
        path.addCurve(to: CGPoint(x: 0.6915*width, y: 0.49117*height), control1: CGPoint(x: 0.55033*width, y: 0.65733*height), control2: CGPoint(x: 0.62758*width, y: 0.56942*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.42025*width, y: 0.93125*height))
        path.addLine(to: CGPoint(x: 0.42*width, y: 0.931*height))
        path.addCurve(to: CGPoint(x: 0.42167*width, y: 0.93133*height), control1: CGPoint(x: 0.42092*width, y: 0.93117*height), control2: CGPoint(x: 0.42158*width, y: 0.93133*height))
        path.addCurve(to: CGPoint(x: 0.42025*width, y: 0.93133*height), control1: CGPoint(x: 0.4212*width, y: 0.93125*height), control2: CGPoint(x: 0.42072*width, y: 0.93125*height))
        path.addLine(to: CGPoint(x: 0.42025*width, y: 0.93125*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.47775*width, y: 0.98475*height))
        path.addLine(to: CGPoint(x: 0.47733*width, y: 0.98442*height))
        path.addLine(to: CGPoint(x: 0.47758*width, y: 0.98417*height))
        path.addCurve(to: CGPoint(x: 0.47792*width, y: 0.98433*height), control1: CGPoint(x: 0.47775*width, y: 0.98417*height), control2: CGPoint(x: 0.47783*width, y: 0.98433*height))
        path.addCurve(to: CGPoint(x: 0.47767*width, y: 0.98475*height), control1: CGPoint(x: 0.47792*width, y: 0.9845*height), control2: CGPoint(x: 0.47775*width, y: 0.98458*height))
        path.addLine(to: CGPoint(x: 0.47775*width, y: 0.98475*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.54742*width, y: 0.92467*height))
        path.addLine(to: CGPoint(x: 0.55892*width, y: 0.91267*height))
        path.addCurve(to: CGPoint(x: 0.55917*width, y: 0.91308*height), control1: CGPoint(x: 0.559*width, y: 0.91275*height), control2: CGPoint(x: 0.55908*width, y: 0.91292*height))
        path.addCurve(to: CGPoint(x: 0.54733*width, y: 0.92467*height), control1: CGPoint(x: 0.55525*width, y: 0.91692*height), control2: CGPoint(x: 0.55133*width, y: 0.92083*height))
        path.addLine(to: CGPoint(x: 0.54742*width, y: 0.92467*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.56608*width, y: 0.90625*height))
        path.addCurve(to: CGPoint(x: 0.57333*width, y: 0.89775*height), control1: CGPoint(x: 0.56825*width, y: 0.90375*height), control2: CGPoint(x: 0.57075*width, y: 0.90083*height))
        path.addCurve(to: CGPoint(x: 0.57367*width, y: 0.89742*height), control1: CGPoint(x: 0.57342*width, y: 0.89767*height), control2: CGPoint(x: 0.5735*width, y: 0.8975*height))
        path.addCurve(to: CGPoint(x: 0.6585*width, y: 0.812*height), control1: CGPoint(x: 0.60108*width, y: 0.86917*height), control2: CGPoint(x: 0.62933*width, y: 0.84058*height))
        path.addCurve(to: CGPoint(x: 0.65908*width, y: 0.8115*height), control1: CGPoint(x: 0.65867*width, y: 0.81183*height), control2: CGPoint(x: 0.65892*width, y: 0.81167*height))
        path.addCurve(to: CGPoint(x: 0.68175*width, y: 0.79417*height), control1: CGPoint(x: 0.66625*width, y: 0.806*height), control2: CGPoint(x: 0.67425*width, y: 0.79992*height))
        path.addCurve(to: CGPoint(x: 0.56608*width, y: 0.90633*height), control1: CGPoint(x: 0.64408*width, y: 0.83017*height), control2: CGPoint(x: 0.60583*width, y: 0.86733*height))
        path.addLine(to: CGPoint(x: 0.56608*width, y: 0.90625*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.7465*width, y: 0.44058*height))
        path.addCurve(to: CGPoint(x: 0.69958*width, y: 0.50783*height), control1: CGPoint(x: 0.731*width, y: 0.46075*height), control2: CGPoint(x: 0.714*width, y: 0.48692*height))
        path.addCurve(to: CGPoint(x: 0.50433*width, y: 0.73825*height), control1: CGPoint(x: 0.65408*width, y: 0.57375*height), control2: CGPoint(x: 0.50758*width, y: 0.73517*height))
        path.addCurve(to: CGPoint(x: 0.37025*width, y: 0.86633*height), control1: CGPoint(x: 0.48175*width, y: 0.76008*height), control2: CGPoint(x: 0.41367*width, y: 0.82542*height))
        path.addCurve(to: CGPoint(x: 0.36742*width, y: 0.86925*height), control1: CGPoint(x: 0.36908*width, y: 0.86742*height), control2: CGPoint(x: 0.36817*width, y: 0.86833*height))
        path.addCurve(to: CGPoint(x: 0.36557*width, y: 0.86467*height), control1: CGPoint(x: 0.36623*width, y: 0.86802*height), control2: CGPoint(x: 0.36557*width, y: 0.86638*height))
        path.addCurve(to: CGPoint(x: 0.36767*width, y: 0.85983*height), control1: CGPoint(x: 0.36557*width, y: 0.86283*height), control2: CGPoint(x: 0.36633*width, y: 0.86108*height))
        path.addCurve(to: CGPoint(x: 0.751*width, y: 0.43167*height), control1: CGPoint(x: 0.5745*width, y: 0.66483*height), control2: CGPoint(x: 0.7*width, y: 0.50242*height))
        path.addCurve(to: CGPoint(x: 0.74642*width, y: 0.44075*height), control1: CGPoint(x: 0.74992*width, y: 0.43442*height), control2: CGPoint(x: 0.749*width, y: 0.43742*height))
        path.addLine(to: CGPoint(x: 0.7465*width, y: 0.44058*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.88408*width, y: 0.49975*height))
        path.addLine(to: CGPoint(x: 0.884*width, y: 0.49992*height))
        path.addCurve(to: CGPoint(x: 0.88408*width, y: 0.49975*height), control1: CGPoint(x: 0.884*width, y: 0.49975*height), control2: CGPoint(x: 0.88383*width, y: 0.49933*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.82742*width, y: 0.53575*height))
        path.addCurve(to: CGPoint(x: 0.80483*width, y: 0.492*height), control1: CGPoint(x: 0.80858*width, y: 0.52483*height), control2: CGPoint(x: 0.79975*width, y: 0.5085*height))
        path.addLine(to: CGPoint(x: 0.80642*width, y: 0.4865*height))
        path.addCurve(to: CGPoint(x: 0.80875*width, y: 0.48175*height), control1: CGPoint(x: 0.80708*width, y: 0.48492*height), control2: CGPoint(x: 0.80783*width, y: 0.48333*height))
        path.addCurve(to: CGPoint(x: 0.82975*width, y: 0.46208*height), control1: CGPoint(x: 0.81367*width, y: 0.47358*height), control2: CGPoint(x: 0.82117*width, y: 0.46633*height))
        path.addCurve(to: CGPoint(x: 0.831*width, y: 0.46175*height), control1: CGPoint(x: 0.83017*width, y: 0.46192*height), control2: CGPoint(x: 0.83058*width, y: 0.46183*height))
        path.addCurve(to: CGPoint(x: 0.83067*width, y: 0.45817*height), control1: CGPoint(x: 0.83056*width, y: 0.46061*height), control2: CGPoint(x: 0.83044*width, y: 0.45937*height))
        path.addCurve(to: CGPoint(x: 0.83617*width, y: 0.45333*height), control1: CGPoint(x: 0.83108*width, y: 0.45558*height), control2: CGPoint(x: 0.83275*width, y: 0.45333*height))
        path.addCurve(to: CGPoint(x: 0.86567*width, y: 0.46417*height), control1: CGPoint(x: 0.84175*width, y: 0.45333*height), control2: CGPoint(x: 0.85908*width, y: 0.4585*height))
        path.addCurve(to: CGPoint(x: 0.87133*width, y: 0.46942*height), control1: CGPoint(x: 0.86767*width, y: 0.46575*height), control2: CGPoint(x: 0.86958*width, y: 0.4675*height))
        path.addCurve(to: CGPoint(x: 0.87933*width, y: 0.4805*height), control1: CGPoint(x: 0.87383*width, y: 0.47233*height), control2: CGPoint(x: 0.8775*width, y: 0.47708*height))
        path.addCurve(to: CGPoint(x: 0.8825*width, y: 0.48808*height), control1: CGPoint(x: 0.88042*width, y: 0.481*height), control2: CGPoint(x: 0.88125*width, y: 0.48567*height))
        path.addCurve(to: CGPoint(x: 0.884*width, y: 0.49975*height), control1: CGPoint(x: 0.88367*width, y: 0.49192*height), control2: CGPoint(x: 0.88417*width, y: 0.49583*height))
        path.addCurve(to: CGPoint(x: 0.88408*width, y: 0.5*height), control1: CGPoint(x: 0.884*width, y: 0.49992*height), control2: CGPoint(x: 0.884*width, y: 0.49992*height))
        path.addCurve(to: CGPoint(x: 0.88375*width, y: 0.50333*height), control1: CGPoint(x: 0.88383*width, y: 0.50058*height), control2: CGPoint(x: 0.88408*width, y: 0.50308*height))
        path.addCurve(to: CGPoint(x: 0.8775*width, y: 0.52042*height), control1: CGPoint(x: 0.88292*width, y: 0.50933*height), control2: CGPoint(x: 0.88075*width, y: 0.51525*height))
        path.addCurve(to: CGPoint(x: 0.87658*width, y: 0.52175*height), control1: CGPoint(x: 0.87717*width, y: 0.52083*height), control2: CGPoint(x: 0.87692*width, y: 0.52133*height))
        path.addCurve(to: CGPoint(x: 0.87633*width, y: 0.52208*height), control1: CGPoint(x: 0.87658*width, y: 0.52183*height), control2: CGPoint(x: 0.87642*width, y: 0.52192*height))
        path.addCurve(to: CGPoint(x: 0.86733*width, y: 0.5315*height), control1: CGPoint(x: 0.87383*width, y: 0.52567*height), control2: CGPoint(x: 0.87092*width, y: 0.529*height))
        path.addCurve(to: CGPoint(x: 0.83233*width, y: 0.53808*height), control1: CGPoint(x: 0.85683*width, y: 0.53892*height), control2: CGPoint(x: 0.84458*width, y: 0.54117*height))
        path.addCurve(to: CGPoint(x: 0.82758*width, y: 0.536*height), control1: CGPoint(x: 0.83072*width, y: 0.53747*height), control2: CGPoint(x: 0.82913*width, y: 0.53678*height))
        path.addLine(to: CGPoint(x: 0.82742*width, y: 0.53575*height))
        path.closeSubpath()
        path.move(to: CGPoint(x: 0.963*width, y: 0.52217*height))
        path.addCurve(to: CGPoint(x: 0.948*width, y: 0.57533*height), control1: CGPoint(x: 0.95892*width, y: 0.53925*height), control2: CGPoint(x: 0.95392*width, y: 0.55708*height))
        path.addCurve(to: CGPoint(x: 0.94775*width, y: 0.57725*height), control1: CGPoint(x: 0.94775*width, y: 0.576*height), control2: CGPoint(x: 0.94775*width, y: 0.57667*height))
        path.addCurve(to: CGPoint(x: 0.9455*width, y: 0.57817*height), control1: CGPoint(x: 0.94692*width, y: 0.57733*height), control2: CGPoint(x: 0.94617*width, y: 0.57767*height))
        path.addCurve(to: CGPoint(x: 0.83733*width, y: 0.66242*height), control1: CGPoint(x: 0.9085*width, y: 0.60533*height), control2: CGPoint(x: 0.87275*width, y: 0.63333*height))
        path.addCurve(to: CGPoint(x: 0.93092*width, y: 0.5795*height), control1: CGPoint(x: 0.86792*width, y: 0.63475*height), control2: CGPoint(x: 0.89892*width, y: 0.60725*height))
        path.addCurve(to: CGPoint(x: 0.9485*width, y: 0.54833*height), control1: CGPoint(x: 0.94018*width, y: 0.57144*height), control2: CGPoint(x: 0.9464*width, y: 0.56043*height))
        path.addLine(to: CGPoint(x: 0.95317*width, y: 0.52025*height))
        path.addLine(to: CGPoint(x: 0.95342*width, y: 0.51942*height))
        path.addCurve(to: CGPoint(x: 0.96317*width, y: 0.52217*height), control1: CGPoint(x: 0.9555*width, y: 0.5135*height), control2: CGPoint(x: 0.96458*width, y: 0.51608*height))
        path.addLine(to: CGPoint(x: 0.963*width, y: 0.52217*height))
        path.closeSubpath()
        return path
    }
}


struct ExcalidrawIconView: View {
    
    var body: some View {
        ExcalidrawRawIcon()
            .fill(Color.accentColor)
            .scaledToFit()
            .scaleEffect(1.5, anchor: .bottomTrailing)
    }
}
